<template>
  <div class="drag">
    <div id="app" class="chatKfPageApp df">
      <div class="chatKfPageAppleft">
        <Menu :menuindex="menuindex" @menuindex="handleMenuIndex"></Menu>
      </div>
      <div class="chatKfPageAppright nodrag">
        <Nav></Nav>
        <router-view></router-view>
      </div>
    </div>
  </div>
</template>
<script>
import Menu from "@/components/menu.vue";
import Nav from "@/components/nav.vue";
export default {
  name: "App",
  components: { Menu, Nav },
  data() {
    return {
      menuindex: localStorage.getItem("menuindex")
        ? Number(localStorage.getItem("menuindex"))
        : 1,
    };
  },
  created() {
    document.getElementById("loadingPage").remove();
  },
  methods: {
    handleMenuIndex(param) {
      this.menuindex = param;
    },
  },
};
</script>
